<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="/static/webjars/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/base/common/css/sapar.css"/>
    <link rel="stylesheet" href="/static/base/static/css/index.css"/>
    <title>智慧兴文公共信息平台</title>
</head>

<body>
<div id="container">
    <div id="hd">
        <div class="hd-wrap clearfix">
            <div class="top-light"></div>
            <h1 class="logo"></h1>
            <ul class="main-nav clearfix">

                <c:if test="${user.gridIndex ==1}">
                    <li city-system="1" data-src="/grid/index"><a href="javascript:;">移动网格化深度应用</a></li>
                </c:if>

                <c:if test="${user.colligateIndex ==1}">
                    <li city-system="2" data-src="/colligate/index"><a href="javascript:;">综合受理</a></li>
                </c:if>

                <c:if test="${user.businessIndex ==1}">
                    <li city-system="3" data-src="/business/index"><a href="javascript:;">业务处置</a></li>
                </c:if>

                <c:if test="${user.commandIndex ==1}">
                    <li city-system="4" data-src="/command/index"><a href="javascript:;">综合指挥</a></li>
                </c:if>

                <c:if test="${user.houseIndex ==1}">
                    <li city-system="5" data-src="/house/index"><a href="javascript:;">居民与房屋管理</a></li>
                </c:if>

                <c:if test="${user.superviseIndex ==1}">
                    <li city-system="6" data-src="/supervise/index"><a href="javascript:;">决策分析与监督</a></li>
                </c:if>

                <c:if test="${user.specialIndex ==1}">
                    <li party-src="/special/index"><a href="javascript:;">图形化展示</a></li>
                </c:if>

                <c:if test="${user.authIndex ==1}">
                    <li party-src="/auth/index"><a href="javascript:;">权限管理</a></li>
                </c:if>


            </ul>
            <div class="toolbar">
                <div class="login-info clearfix" id="userInfo"></div>
                <div class="tool clearfix">
                    <a href="javascript:;" class="msg-btn">消息</a>
                    <a href="javascript:;" class="help-btn">帮助</a>
                    <a href="javascript:;" class="quit-btn exit">退出</a>
                </div>
            </div>
        </div>
    </div>
    <div id="bd">
        <div class="wrap clearfix" style="height: 870px;">
            <iframe src="" id="iframe" width="100%" height="100%" frameborder="0"></iframe>
        </div>
    </div>
</div>
<%--<div id="ft" class="clearfix">--%>
    <%--<div class="ft-center">--%>
        <%--<span>智慧兴文公共信息平台:&nbsp;</span>--%>
        <%--<a>All Rights Reserved.&nbsp;&nbsp;</a>--%>
        <%--<span>版权所有:&nbsp;</span>--%>
        <%--<a href="http://www.ituohui.com/" target="_blank">四川省数聚汇智科技有限公司</a>--%>
    <%--</div>--%>
<%--</div>--%>
</div>
<div class="exitDialog">
    <div class="dialog-content">
        <div class="ui-dialog-icon"></div>
        <div class="ui-dialog-text">
            <p class="dialog-content">你确定要退出系统？</p>
            <p class="tips">如果是请点击“确定”，否则点“取消”</p>

            <div class="buttons">
                <input type="button" class="button long2 ok" value="确定"/>
                <input type="button" class="button long2 normal" value="取消"/>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/webjars/layui/layui.all.js"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/base/common/js/sapar.js"></script>
<script type="text/javascript" src="/static/base/static/js/index.js"></script>
<script type="text/javascript" src="/static/webjars/leis/js/leis.js"></script>
<script type="text/javascript" src="/static/webjars/leis/js/leis.open.js"></script>
<script type="text/javascript">

    $("li[party-src]").click(function () {
        var that = $(this);
        var src = that.attr("party-src");
        window.open(src);
    });

    $(function () {
        var system = "${system}";
        if (system === "") refresh("home.html", {system: 1});
        var nav_li = $(".main-nav li[city-system=" + system + "]");
        nav_li.siblings().removeClass('current').end().addClass('current');
        $('#iframe').attr('src', nav_li.attr('data-src'));
    });

    $('.main-nav').on('click', 'li[city-system]', function () {
        refresh("home.html", {system: $(this).attr('city-system')})
    });

    $(function () {
        var sign = $.cookie("sign");
        $.post("/api/pub/getUserInfo", {
            sign: sign
        }, function (res) {
            if (res.code === 1) {
                var str = '<div class="welcome clearfix"><span style="margin-left: -42px;">欢迎您,</span><a href="javascript:;" id= "user-name" class="user-name">' + res.data.name + '</a></div>';
                $("#userInfo").html(str);
            }
        });
    });

</script>
</html>
